package com.easemob.server.example.comm.body;

import com.easemob.server.example.comm.wrapper.BodyWrapper;
import com.fasterxml.jackson.databind.node.ContainerNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;

public class ChatMessageBody implements BodyWrapper {
	private long limit;
	
	private String ql;
	
	private String cursor;
	
	public ChatMessageBody(long limit, String ql, String cursor) {
		this.limit = limit;
		this.ql = ql;
		this.cursor = cursor;
	}
	
	public ContainerNode<?> getBody() {
		return JsonNodeFactory.instance.objectNode().put("limit", limit).put("cursor", cursor).put("ql", ql);
	}

	public Boolean validate() {
		return true;
	}

}
